package com.kefu.robot.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.kefu.chat.service.RobotShareService;
import com.kefu.common.service.AbstractKefuService;
import com.kefu.robot.mapper.RobotInfoMapper;
import com.kefu.robot.model.RobotInfo;


@Service
public class RobotInfoService  extends AbstractKefuService<RobotInfo> {
    @Autowired
    protected RobotInfoMapper robotInfoMapper;

    @Autowired
    RobotShareService robotShareService;
	
	public int getMaxRobot(String tenantId) {
		return robotInfoMapper.getMaxRobot(tenantId);
	}

	public RobotInfo update(RobotInfo robotInfo){
		return super.update(robotInfo);
	}
	
	public RobotInfo getByRobotNo(String tenantId, int robotNo) {
		return robotShareService.getByRobotNo(tenantId, robotNo);
	}

}
